//
//  LYheadView.m
//  WHISPER
//
//  Created by lanou3g on 15/12/18.
//  Copyright © 2015年 梁媛. All rights reserved.
//

#import "LYheadView.h"

@implementation LYheadView

- (UIView *)lunboView{
    if (!_lunboView) {
        _lunboView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, 120)];
        [self addSubview:_lunboView];
    }
    return _lunboView;
}
- (UIButton *)firstButton{
    if (!_firstButton) {
        _firstButton = [UIButton buttonWithType:UIButtonTypeSystem];
        CGFloat width = (self.frame.size.width - 20) / 3;
        _firstButton.frame = CGRectMake(5, CGRectGetMaxY(self.lunboView.frame) + 5, width, width);
        [self addSubview:_firstButton];
    }
    return _firstButton;
}
- (UIButton *)secondButton{
    if (!_secondButton) {
        _secondButton = [UIButton buttonWithType:UIButtonTypeSystem];
        _secondButton.frame = CGRectMake(CGRectGetMaxX(self.firstButton.frame) + 5, CGRectGetMinY(self.firstButton.frame), CGRectGetWidth(self.firstButton.frame), CGRectGetHeight(self.firstButton.frame));
        [self addSubview:_secondButton];
    }
    return _secondButton;
}
- (UIButton *)thirdButton{
    if (!_thirdButton) {
        _thirdButton = [UIButton buttonWithType:UIButtonTypeSystem];
        _thirdButton.frame = CGRectMake(CGRectGetMaxX(self.secondButton.frame) + 5, CGRectGetMinY(self.firstButton.frame), CGRectGetWidth(self.firstButton.frame), CGRectGetHeight(self.firstButton.frame));
        [self addSubview:_thirdButton];
    }
    return _thirdButton;
}
@end
